package com.haotian.db.jdbc.druid;

import java.sql.SQLException;

import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.haotian.db.jdbc._DBConnectionPool;

public class _DruidConnectionPool implements _DBConnectionPool {

	private DruidDataSource ds = null;

	public _DruidConnectionPool(DruidDataSource ds){
		this.ds = ds;
	}

	/**
	 * 获得链接
	 * 
	 * @return DruidPooledConnection 父类 java.sql.Connection
	 * @throws SQLException
	 */
	public DruidPooledConnection getConnection() throws SQLException {
		DruidPooledConnection con = null;
		if (ds != null) {
			con = ds.getConnection();
		}
		return con;
	}

}
